Examines a given area for objects or groups of adjacent objects over a given size. Returns a true or false value plus a confidence level. To examine the entire image, rather than just a given rectangle, the DetectBlankPage subcode should be used.
The uncompressed image to be processed must reside in the Get Queue prior to REQ_EXEC. Typically, the image will be fully contained in the Get Queue, but that is not a requirement. There is no output image from this operation.
- Subcode is set to SF_SUBCODE_DETECT_BLANK_RECTANGLE (14).
- RectX is the distance from the left edge, in pixels, of rectangle of interest. This value must be set to a valid image coordinate. This value will be ignored unless u.SF.PicFlags2 includes PF2_ActOnRectangle.
- RectY is the distance from the top edge, in pixels, of rectangle of interest. This value must be set to a valid image coordinate. This value will be ignored unless u.SF.PicFlags2 includes PF2_ActOnRectangle.
- RectWidth is the width, in pixels, of rectangle of interest. This value must specify a valid rectangle on the image. This value will be ignored unless u.SF.PicFlags2 includes PF2_ActOnRectangle.
- RectHeight is the height, in pixels, of rectangle of interest. This value must specify a valid rectangle on the image. This value will be ignored unless u.SF.PicFlags2 includes PF2_ActOnRectangle.
- u.SC14.BlankDetectMinContrast indicates the minimum level of contrast (on a scane of 1 to 255) between the background and foreground for color and gray images. This parameter is ignored for bitonal images.
- u.SC14.BlankDetectMinObjectDimension is the minimum size (width or height) of an object group that is to be considered data.
- u.SC14.BlankDetectGapFill is the amount of allowable space between adjacent objects for them to be considered a group.
- u.SC14.BlankDetectIgnoreBorder invokes a fast, simple border detection function. If a border is found, the RectX and RectY values will be shifted by the top and left portions of the detected border. If the shifted rectangle overlaps the left and/or bottom border, then the width and height will be clipped to fit in the borders. This function only detects clean borders, and will fail on noisy borders. For noisy borders, a dedicated border detection or cropping method should be used before invoing blank page detection.
- Stride is set to the image line width in bytes including padding at the end of the line width or to 0. If Stride is 0 and PF_NoDibPad is set in PicFlags, the operation will compute the stride using: [ (PixelWidth*BitCount)/8 ]. If Stride is 0 and PF_NoDibPad is not set in PicFlags, the operation will compute the stride using: [ (((PixelWidth*BitCount)+31)&(~31))/8 ].
This operation does not produce an output image. Instead, the output is stored back into the PIC_PARM structure in the following locations.
- Confidence is set, during REQ_EXEC, from 0 to 100 with 0 indicating that the returned result is probably not correct and 100 indicating that the returned result is almost certainly correct. Low confidence values on a "blank" determination indicate a significant number of objects near, but below the size threshold. Low confidence values on a "not blank" determination indicate a low number of objects over the size threshold.
- u.SC14.BlankDetectIsBlank is set, during REQ_EXEC, to true (1) or false (0) based on whether any objects over the size threshold were found in the given region.